package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

@TableName("t_forumChannel")
public class ChannelBean {
    /**
     * 频道ID
     */
    @TableId(value = "pk_channelId",type = IdType.AUTO)
    private Integer id;
    /**
     * 频道名
     */
    @TableField("c_theme")
    private String name;

    /**
     * 频道描述
     */
    @TableField("c_desp")
    private String desp;
    /**
     * 主贴数
     */
    @TableField(exist = false)
    private Integer postsNum;
    /**
     * 主贴集合
     */
    @TableField(exist = false)
    private List<PostsBean> pList;

    public ChannelBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesp() {
        return desp;
    }

    public void setDesp(String desp) {
        this.desp = desp;
    }

    public Integer getPostsNum() {
        return postsNum;
    }

    public void setPostsNum(Integer postsNum) {
        this.postsNum = postsNum;
    }

    public List<PostsBean> getpList() {
        return pList;
    }

    public void setpList(List<PostsBean> pList) {
        this.pList = pList;
    }

    @Override
    public String toString() {
        return "ChannelBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", desp='" + desp + '\'' +
                ", postsNum=" + postsNum +
                ", pList=" + pList +
                "}\n";
    }
}
